package com.example.dee.util;

import com.example.dee.config.ParamConfig;

import java.text.SimpleDateFormat;
import java.util.Date;

public class RandomUtil {
    private static SimpleDateFormat sdf1=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    private static SimpleDateFormat sdf2=new SimpleDateFormat("YYYYMMddHH");
    private static SimpleDateFormat sdf3=new SimpleDateFormat("YYYY-MM-dd");


    public static String getNowDateForString() {
        Date date = new Date();
        String dateString = sdf1.format(date);
        return dateString;
    }
    public static String getDateFormat(Date date) {
        String dateString = sdf1.format(date);
        return dateString;
    }

    public static String getCarDataId() {
        return sdf2.format(new Date());
    }

    public static void main(String[] args) {
        System.out.println(new Date(1658296878));
    }

    public static String getDateYYYYMMDDFormat(Date date) {
        return sdf3.format(date);
    }
}
